module Fitness where

import Evaluator2
import qualified Data.Map as M
import Data.Map((!))

stateVitality :: PlayerState->Int
stateVitality state = M.fold (\sl s -> vitality sl + s) 0 . unPS $ state

fitness :: GameState->Int
fitness state = (stateVitality $ proponent state) - (stateVitality $ opponent state)
